package chapter19;

/**
 * @author lzy
 * @version v1.0
 * Create DateTime: 2019/4/3 11:19
 */
public enum OverrideConstantSpecific {
    NUT, BOLT, WASHER {
        @Override
        void f() {
            System.out.println("overridden method");
        }
    };

    public static void main(String[] args) {
        for (OverrideConstantSpecific value : values()) {
            System.out.println(value + ":");
            value.f();
        }
    }

    void f() {
        System.out.println("default behavior");
    }
}
